<?php

declare(strict_types=1);

namespace App\Model\Ai;

use Hyperf\DbConnection\Model\Model;

/**
 * @property int $id 
 * @property int $user_id 用户id
 * @property int $model_type  模型类型:1=文本模型,2=图片模型,3=视频模型,4=应用模型
 * @property int $input_tokens 输入token数
 * @property int $output_tokens 输出token数
 * @property string $request_params 请求参数
 * @property string $response_summary 响应摘要
 * @property int $status 调用状态:1=执行中 2=执行完成 3=执行失败
 * @property \Carbon\Carbon $created_at 
 */
class UsageLog extends Model
{
    /**
     * The table associated with the model.
     */
    protected ?string $table = 'usage_log';

    /**
     * The attributes that are mass assignable.
     */
    protected array $fillable = [
        'user_id',
        'model_type',
        'input_tokens',
        'output_tokens',
        'request_params',
        'response_summary',
        'status',
    ];

    /**
     * The attributes that should be cast to native types.
     */
    protected array $casts = ['id' => 'integer', 'user_id' => 'integer', 'model_type' => 'integer', 'input_tokens' => 'integer', 'output_tokens' => 'integer', 'status' => 'integer', 'created_at' => 'datetime'];
}
